# Hisilicon Hi35xx sample Makefile

include ../Makefile.param

# lib name define
NAME = mpp
TARGET = lib$(NAME).a

# target source

.PHONY : clean all

#ar flag
ARFLAGS = -r
INCDIRS += -I ../audio/adp

CFLAGS += $(INCDIRS) 

all: $(TARGET)

objects := $(patsubst %.c,%.o,$(wildcard *.c))

$(TARGET) : $(objects)
	$(AR) $(ARFLAGS) $@  $^ $(MPI_LIBS) $(SENSOR_LIBS) $(AUDIO_LIBA)
	
$(objects): %.o: %.c 
	$(CC) -c $(CFLAGS) $(LDFLAGS) $< -o $@
	

clean:
	@rm -f $(TARGET)
	@rm -f $(OBJ)
	@rm -f $(objects)

cleanstream:
	@rm -f *.h264
	@rm -f *.h265
	@rm -f *.jpg
	@rm -f *.mjp
	@rm -f *.mp4
